<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        .big-box {
            display: flex;
        }

        .box {
            width: 900px;
            height: 600px;
            display: flex;
            border: 1px solid gray;
            flex-wrap: wrap;
            justify-content: space-around;
        }

        .box .shangpin {
            padding-top: 10px;
            width: 20%;
            height: 55%;
            text-align: center;
            margin: 0 10px;
        }

        .box .shangpin img {
            width: 100%;
            /* height: 100%; */
        }

        .box .shangpin button {
            width: 100px;
            height: 20px;
            background-color: red;
            color: white;
            text-align: center;
            line-height: 20px;
            border: none;
            cursor: pointer;
        }

        .gouwuche {
            width: 400px;
            line-height: 133px;
            border: 1px solid gray;
        }

        .gouwuche .list {
            width: 400px;
            height: 100px;
            /* line-height: 200px; */
            display: flex;
        }

        .gouwuche .list .gouwuchelist {
            width: 100%;
            display: flex;
            text-align: center;
            justify-content: space-between;
            margin: a auto;
            line-height: 100px;
            margin: 5px auto;
            padding-left: 10px;

        }

        .gouwuche .list .gouwuchelist button {
            /* display: block; */
            width: 80px;
            height: 20px;
            /* line-height: 100px; */
            margin: auto 0;
            /* justify-items: center; */

        }

        .gouwuche .list .gouwuchelist .jiage {
            display: block;
        }
    </style>
</head>

<body>
    <div class="big-box">
        <div class="box">
            <div class="shangpin">
                <img src="./img/1.png" alt="">
                <div>高级办公椅</div>
                <div>10000</div>
                <button>加入购物车</button>
            </div>
            <div class="shangpin">
                <img src="./img/2.png" alt="">
                <div>高级办公椅</div>
                <div>10000</div>
                <button>加入购物车</button>
            </div>
            <div class="shangpin">
                <img src="./img/3.png" alt="">
                <div>高级办公椅</div>
                <div>10000</div>
                <button>加入购物车</button>
            </div>
            <div class="shangpin">
                <img src="./img/1.png" alt="">
                <div>高级办公椅</div>
                <div>10000</div>
                <button>加入购物车</button>
            </div>

        </div>
        <div class="gouwuche">
            <h2>购物车(2)</h2>
            <div class="list">
                <div class="gouwuchelist">
                    <input type="checkbox">
                    <img src="./img/2.png" alt="">
                    <div class="jiage">10000</div>
                    <div class="shuliang">1</div>
                    <button>删除收藏</button>
                </div>
            </div>
            <div class="list">
                <div class="gouwuchelist">
                    <input type="checkbox">
                    <img src="./img/2.png" alt="">
                    <div class="jiage">10000</div>
                    <div class="shuliang">1</div>
                    <button>删除收藏</button>
                </div>
            </div>
        </div>
    </div>
</body>

</html>
<script>
    var arr=['./img/1.png','./img/2.png','./img/3.png']
   
    // var imgs = document.querySelectorAll('.box>.shangpin img')
    // console.log(sps)
    var imgs=[...document.querySelectorAll('.box>.shangpin img')]
    console.log(imgs)
    // sps.onclick = function () {
    //     console.log('找到了')
    // }

</script>